Crate fork

source ·
Expand description

Library for creating a new process detached from the controlling terminal (daemon).

Example:

use fork::{daemon, Fork};
use std::process::Command;

if let Ok(Fork::Child) = daemon(false, false) {
   Command::new("sleep")
       .arg("3")
       .output()
       .expect("failed to execute process");
}

Enums§

Functions§